using System;
using System.Data;
using System.Collections.Generic;
namespace eTMS.DAO
{
    /********************************BEGIN SinhVienNghiHocDAO****************************************/
    ///<summary>
    /// <para>Author: Auto generated class by CSharp Code Generator v2.0</para>
    /// <para>Date:13/10/2011 41:04:34</para>
    /// <para>Class Name: SinhVienNghiHocDAO</para>
    /// <para>Description: Class access to table SinhVienNghiHoc in database. Class for coder code here</para>
    ///</summary>


    public partial class SinhVienNghiHocDAO
    {
        public DataSet SelectAllDSSinhVienNghiHoc(int DiemDanhSinhVien_ID)
        {
            IDbCommand cmd = this.CreateCommand();
            cmd.CommandText = @"SELECT        SinhVienNghiHoc.DiemDanhSinhVien_ID, SinhVienNghiHoc.SinhVien_ID, SinhVienNghiHoc.LoaiNghi, SinhVienNghiHoc.SinhVienNghiHoc_ID, SinhVien.MaSinhVien, 
                                        SinhVien.TenSinhVien, SinhVien.GioiTinh, SinhVien.NgaySinh, NganhHoc.TenNganhHoc, Lop.TenLop
                                FROM            SinhVien INNER JOIN
                                                     SinhVienNghiHoc ON SinhVien.SinhVien_ID = SinhVienNghiHoc.SinhVien_ID LEFT JOIN
                                                     PhanNganhSinhVien ON SinhVien.SinhVien_ID = PhanNganhSinhVien.SinhVien_ID LEFT JOIN
                                                     NganhHoc ON PhanNganhSinhVien.NganhHoc_ID = NganhHoc.NganhHoc_ID LEFT JOIN
                                                     LopSinhVien ON SinhVien.SinhVien_ID = LopSinhVien.SinhVien_ID LEFT JOIN
                                                     Lop ON LopSinhVien.Lop_ID = Lop.Lop_ID
                                WHERE DiemDanhSinhVien_ID=" + DiemDanhSinhVien_ID.ToString();
            return this.SelectDS(cmd);

        }

    }
    /*****************************************************************************************************/
    /**********************************END SinhVienNghiHocDAO*****************************************/
    /*****************************************************************************************************/
}

